package com.qf;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class scheauled {
    @Scheduled(cron = "0/2 * * * * ?")//定时器注解，按照cron表达式里面指定的周期取执行
    public void test(){
        System.out.println("欢迎");
    }

}
